import request from "@/utils/request";

//添加分类
export function addBlogType(data) {
  return request({ url: "/api/blogtype", method: "POST", data });
}

//删除分类
export function deleteBlogType(id) {
  return request({ url: `/api/blogtype/${id}`, method: "DELETE" });
}

//获取博客分类
export function getBlogType() {
  return request({ url: "/api/blogtype", method: "GET" });
}

//修改博客分类
export function updateBlogType(id, data) {
  return request({ url: `/api/blogtype/${id}`, method: "PUT", data });
}

//获取一个博客分类
export function getOneBlogType(id) {
  return request({ url: `/api/blogtype/${id}`, method: "GET" });
}
